package pcjavanet.mobilesell.model;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

public class AuthorizationsExample {
    protected String orderByClause;

    protected boolean distinct;

    protected List<Criteria> oredCriteria;

    public AuthorizationsExample() {
        oredCriteria = new ArrayList<Criteria>();
    }

    public void setOrderByClause(String orderByClause) {
        this.orderByClause = orderByClause;
    }

    public String getOrderByClause() {
        return orderByClause;
    }

    public void setDistinct(boolean distinct) {
        this.distinct = distinct;
    }

    public boolean isDistinct() {
        return distinct;
    }

    public List<Criteria> getOredCriteria() {
        return oredCriteria;
    }

    public void or(Criteria criteria) {
        oredCriteria.add(criteria);
    }

    public Criteria or() {
        Criteria criteria = createCriteriaInternal();
        oredCriteria.add(criteria);
        return criteria;
    }

    public Criteria createCriteria() {
        Criteria criteria = createCriteriaInternal();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }

    protected Criteria createCriteriaInternal() {
        Criteria criteria = new Criteria();
        return criteria;
    }

    public void clear() {
        oredCriteria.clear();
        orderByClause = null;
        distinct = false;
    }

    protected abstract static class GeneratedCriteria {
        protected List<Criterion> criteria;

        protected GeneratedCriteria() {
            super();
            criteria = new ArrayList<Criterion>();
        }

        public boolean isValid() {
            return criteria.size() > 0;
        }

        public List<Criterion> getAllCriteria() {
            return criteria;
        }

        public List<Criterion> getCriteria() {
            return criteria;
        }

        protected void addCriterion(String condition) {
            if (condition == null) {
                throw new RuntimeException("Value for condition cannot be null");
            }
            criteria.add(new Criterion(condition));
        }

        protected void addCriterion(String condition, Object value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value));
        }

        protected void addCriterion(String condition, Object value1, Object value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value1, value2));
        }

        public Criteria andDbidIsNull() {
            addCriterion("dbid is null");
            return (Criteria) this;
        }

        public Criteria andDbidIsNotNull() {
            addCriterion("dbid is not null");
            return (Criteria) this;
        }

        public Criteria andDbidEqualTo(Integer value) {
            addCriterion("dbid =", value, "dbid");
            return (Criteria) this;
        }

        public Criteria andDbidNotEqualTo(Integer value) {
            addCriterion("dbid <>", value, "dbid");
            return (Criteria) this;
        }

        public Criteria andDbidGreaterThan(Integer value) {
            addCriterion("dbid >", value, "dbid");
            return (Criteria) this;
        }

        public Criteria andDbidGreaterThanOrEqualTo(Integer value) {
            addCriterion("dbid >=", value, "dbid");
            return (Criteria) this;
        }

        public Criteria andDbidLessThan(Integer value) {
            addCriterion("dbid <", value, "dbid");
            return (Criteria) this;
        }

        public Criteria andDbidLessThanOrEqualTo(Integer value) {
            addCriterion("dbid <=", value, "dbid");
            return (Criteria) this;
        }

        public Criteria andDbidIn(List<Integer> values) {
            addCriterion("dbid in", values, "dbid");
            return (Criteria) this;
        }

        public Criteria andDbidNotIn(List<Integer> values) {
            addCriterion("dbid not in", values, "dbid");
            return (Criteria) this;
        }

        public Criteria andDbidBetween(Integer value1, Integer value2) {
            addCriterion("dbid between", value1, value2, "dbid");
            return (Criteria) this;
        }

        public Criteria andDbidNotBetween(Integer value1, Integer value2) {
            addCriterion("dbid not between", value1, value2, "dbid");
            return (Criteria) this;
        }

        public Criteria andRefModuleDbidIsNull() {
            addCriterion("ref_module_dbid is null");
            return (Criteria) this;
        }

        public Criteria andRefModuleDbidIsNotNull() {
            addCriterion("ref_module_dbid is not null");
            return (Criteria) this;
        }

        public Criteria andRefModuleDbidEqualTo(Integer value) {
            addCriterion("ref_module_dbid =", value, "refModuleDbid");
            return (Criteria) this;
        }

        public Criteria andRefModuleDbidNotEqualTo(Integer value) {
            addCriterion("ref_module_dbid <>", value, "refModuleDbid");
            return (Criteria) this;
        }

        public Criteria andRefModuleDbidGreaterThan(Integer value) {
            addCriterion("ref_module_dbid >", value, "refModuleDbid");
            return (Criteria) this;
        }

        public Criteria andRefModuleDbidGreaterThanOrEqualTo(Integer value) {
            addCriterion("ref_module_dbid >=", value, "refModuleDbid");
            return (Criteria) this;
        }

        public Criteria andRefModuleDbidLessThan(Integer value) {
            addCriterion("ref_module_dbid <", value, "refModuleDbid");
            return (Criteria) this;
        }

        public Criteria andRefModuleDbidLessThanOrEqualTo(Integer value) {
            addCriterion("ref_module_dbid <=", value, "refModuleDbid");
            return (Criteria) this;
        }

        public Criteria andRefModuleDbidIn(List<Integer> values) {
            addCriterion("ref_module_dbid in", values, "refModuleDbid");
            return (Criteria) this;
        }

        public Criteria andRefModuleDbidNotIn(List<Integer> values) {
            addCriterion("ref_module_dbid not in", values, "refModuleDbid");
            return (Criteria) this;
        }

        public Criteria andRefModuleDbidBetween(Integer value1, Integer value2) {
            addCriterion("ref_module_dbid between", value1, value2, "refModuleDbid");
            return (Criteria) this;
        }

        public Criteria andRefModuleDbidNotBetween(Integer value1, Integer value2) {
            addCriterion("ref_module_dbid not between", value1, value2, "refModuleDbid");
            return (Criteria) this;
        }

        public Criteria andRefEmployeeDbidIsNull() {
            addCriterion("ref_employee_dbid is null");
            return (Criteria) this;
        }

        public Criteria andRefEmployeeDbidIsNotNull() {
            addCriterion("ref_employee_dbid is not null");
            return (Criteria) this;
        }

        public Criteria andRefEmployeeDbidEqualTo(Integer value) {
            addCriterion("ref_employee_dbid =", value, "refEmployeeDbid");
            return (Criteria) this;
        }

        public Criteria andRefEmployeeDbidNotEqualTo(Integer value) {
            addCriterion("ref_employee_dbid <>", value, "refEmployeeDbid");
            return (Criteria) this;
        }

        public Criteria andRefEmployeeDbidGreaterThan(Integer value) {
            addCriterion("ref_employee_dbid >", value, "refEmployeeDbid");
            return (Criteria) this;
        }

        public Criteria andRefEmployeeDbidGreaterThanOrEqualTo(Integer value) {
            addCriterion("ref_employee_dbid >=", value, "refEmployeeDbid");
            return (Criteria) this;
        }

        public Criteria andRefEmployeeDbidLessThan(Integer value) {
            addCriterion("ref_employee_dbid <", value, "refEmployeeDbid");
            return (Criteria) this;
        }

        public Criteria andRefEmployeeDbidLessThanOrEqualTo(Integer value) {
            addCriterion("ref_employee_dbid <=", value, "refEmployeeDbid");
            return (Criteria) this;
        }

        public Criteria andRefEmployeeDbidIn(List<Integer> values) {
            addCriterion("ref_employee_dbid in", values, "refEmployeeDbid");
            return (Criteria) this;
        }

        public Criteria andRefEmployeeDbidNotIn(List<Integer> values) {
            addCriterion("ref_employee_dbid not in", values, "refEmployeeDbid");
            return (Criteria) this;
        }

        public Criteria andRefEmployeeDbidBetween(Integer value1, Integer value2) {
            addCriterion("ref_employee_dbid between", value1, value2, "refEmployeeDbid");
            return (Criteria) this;
        }

        public Criteria andRefEmployeeDbidNotBetween(Integer value1, Integer value2) {
            addCriterion("ref_employee_dbid not between", value1, value2, "refEmployeeDbid");
            return (Criteria) this;
        }

        public Criteria andOperatetypeIsNull() {
            addCriterion("operatetype is null");
            return (Criteria) this;
        }

        public Criteria andOperatetypeIsNotNull() {
            addCriterion("operatetype is not null");
            return (Criteria) this;
        }

        public Criteria andOperatetypeEqualTo(Integer value) {
            addCriterion("operatetype =", value, "operatetype");
            return (Criteria) this;
        }

        public Criteria andOperatetypeNotEqualTo(Integer value) {
            addCriterion("operatetype <>", value, "operatetype");
            return (Criteria) this;
        }

        public Criteria andOperatetypeGreaterThan(Integer value) {
            addCriterion("operatetype >", value, "operatetype");
            return (Criteria) this;
        }

        public Criteria andOperatetypeGreaterThanOrEqualTo(Integer value) {
            addCriterion("operatetype >=", value, "operatetype");
            return (Criteria) this;
        }

        public Criteria andOperatetypeLessThan(Integer value) {
            addCriterion("operatetype <", value, "operatetype");
            return (Criteria) this;
        }

        public Criteria andOperatetypeLessThanOrEqualTo(Integer value) {
            addCriterion("operatetype <=", value, "operatetype");
            return (Criteria) this;
        }

        public Criteria andOperatetypeIn(List<Integer> values) {
            addCriterion("operatetype in", values, "operatetype");
            return (Criteria) this;
        }

        public Criteria andOperatetypeNotIn(List<Integer> values) {
            addCriterion("operatetype not in", values, "operatetype");
            return (Criteria) this;
        }

        public Criteria andOperatetypeBetween(Integer value1, Integer value2) {
            addCriterion("operatetype between", value1, value2, "operatetype");
            return (Criteria) this;
        }

        public Criteria andOperatetypeNotBetween(Integer value1, Integer value2) {
            addCriterion("operatetype not between", value1, value2, "operatetype");
            return (Criteria) this;
        }

        public Criteria andCreateDateIsNull() {
            addCriterion("create_date is null");
            return (Criteria) this;
        }

        public Criteria andCreateDateIsNotNull() {
            addCriterion("create_date is not null");
            return (Criteria) this;
        }

        public Criteria andCreateDateEqualTo(Date value) {
            addCriterion("create_date =", value, "createDate");
            return (Criteria) this;
        }

        public Criteria andCreateDateNotEqualTo(Date value) {
            addCriterion("create_date <>", value, "createDate");
            return (Criteria) this;
        }

        public Criteria andCreateDateGreaterThan(Date value) {
            addCriterion("create_date >", value, "createDate");
            return (Criteria) this;
        }

        public Criteria andCreateDateGreaterThanOrEqualTo(Date value) {
            addCriterion("create_date >=", value, "createDate");
            return (Criteria) this;
        }

        public Criteria andCreateDateLessThan(Date value) {
            addCriterion("create_date <", value, "createDate");
            return (Criteria) this;
        }

        public Criteria andCreateDateLessThanOrEqualTo(Date value) {
            addCriterion("create_date <=", value, "createDate");
            return (Criteria) this;
        }

        public Criteria andCreateDateIn(List<Date> values) {
            addCriterion("create_date in", values, "createDate");
            return (Criteria) this;
        }

        public Criteria andCreateDateNotIn(List<Date> values) {
            addCriterion("create_date not in", values, "createDate");
            return (Criteria) this;
        }

        public Criteria andCreateDateBetween(Date value1, Date value2) {
            addCriterion("create_date between", value1, value2, "createDate");
            return (Criteria) this;
        }

        public Criteria andCreateDateNotBetween(Date value1, Date value2) {
            addCriterion("create_date not between", value1, value2, "createDate");
            return (Criteria) this;
        }
    }

    public static class Criteria extends GeneratedCriteria {

        protected Criteria() {
            super();
        }
    }

    public static class Criterion {
        private String condition;

        private Object value;

        private Object secondValue;

        private boolean noValue;

        private boolean singleValue;

        private boolean betweenValue;

        private boolean listValue;

        private String typeHandler;

        public String getCondition() {
            return condition;
        }

        public Object getValue() {
            return value;
        }

        public Object getSecondValue() {
            return secondValue;
        }

        public boolean isNoValue() {
            return noValue;
        }

        public boolean isSingleValue() {
            return singleValue;
        }

        public boolean isBetweenValue() {
            return betweenValue;
        }

        public boolean isListValue() {
            return listValue;
        }

        public String getTypeHandler() {
            return typeHandler;
        }

        protected Criterion(String condition) {
            super();
            this.condition = condition;
            this.typeHandler = null;
            this.noValue = true;
        }

        protected Criterion(String condition, Object value, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.typeHandler = typeHandler;
            if (value instanceof List<?>) {
                this.listValue = true;
            } else {
                this.singleValue = true;
            }
        }

        protected Criterion(String condition, Object value) {
            this(condition, value, null);
        }

        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.secondValue = secondValue;
            this.typeHandler = typeHandler;
            this.betweenValue = true;
        }

        protected Criterion(String condition, Object value, Object secondValue) {
            this(condition, value, secondValue, null);
        }
    }
}